<template>
  <div class="container">
    <div class="column left">左侧内容</div>
    <div class="column middle">中间内容</div>
    <div class="column right">右侧内容</div>
  </div>
</template>

<script>
export default {
  name: "ResponsiveLayout",
};
</script>

<style scoped>
.container {
  display: flex;
  flex-wrap: wrap;
  height: 100vh;
  overflow: hidden;
}

.column {
  box-sizing: border-box;
  padding: 20px;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  text-align: center;
  overflow-y: auto;
}

/* 桌面端：三列 */
@media (min-width: 992px) {
  .column.left {
    width: 240px;
  }

  .column.middle {
    flex: 1;
  }

  .column.right {
    width: 300px;
  }
}

/* 平板端：两列 */
@media (min-width: 768px) and (max-width: 991px) {
  .column.left {
    width: 200px;
  }

  .column.middle {
    flex: 1;
  }

  .column.right {
    flex: 0 0 100%;
  }
}

/* 手机端：单列 */
@media (max-width: 767px) {
  .column {
    flex: 0 0 100%;
  }
}
</style>
